package main.java.org.itc1.Presentacion;

import com.opensymphony.xwork2.ActionSupport;

import main.java.org.itc1.Comunicacion.Comunicador_Autenticar;
import main.java.org.itc1.Control.Gestor_Autenticar;
import main.java.org.itc1.Dominio.Autentificacion;

public class Interfaz_Autenticar extends ActionSupport{
	
	
	private Autentificacion autBean = new Autentificacion();
	
	
	/**
	 * @return the autBean
	 */
	public Autentificacion getAutBean() {
		return autBean;
	}


	/**
	 * @param autBean the autBean to set
	 */
	public void setAutBean(Autentificacion autBean) {
		this.autBean = autBean;
	}


	public String execute() {
		
		Gestor_Autenticar gestor = new Gestor_Autenticar();
		boolean validar = gestor.loginValido(autBean);
		
		if(validar){
			return SUCCESS;
		}else{
			return ERROR;
		}
		
		
	}
	
}